package com.zj.restApi;

import com.zj.config.FeignMultipartSupportConfig;
import com.zj.web.bean.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

@FeignClient(name = "fileUpload",configuration = FeignMultipartSupportConfig.class)
public interface FileUploadApi {
    @RequestMapping(value = "/upload",method = RequestMethod.POST,consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    public ResponseEntity<ResponseResult> uploadFile(
            @RequestPart("file") MultipartFile[] files);
}
